package javabase.schoolwork.day6_07;

/**
 * @author fance
 * @date 2018/6/7 20:04
 */
class MyThread extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + " " + i);
        }
    }
}
class MyThreadII implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + " " + i);
        }
    }
}
public class ThreadDemoSum {
    public static void main(String[] args) {
        MyThread myThread1 = new MyThread();
        MyThread myThread2 = new MyThread();
//        myThread1.run();
//        myThread2.run();
        myThread1.start();
        myThread2.start();
    }

}
